Drop glib requrirement to 2.28
authorColin Walters <walters@verbum.org>
Wed, 26 Oct 2011 18:10:20 +0000 (14:10 -0400)
committerColin Walters <walters@verbum.org>
Wed, 26 Oct 2011 18:12:13 +0000 (14:12 -0400)
This lets it build on more currently-released systems like Fedora 15.

configure.ac
src/libostree/ostree-checkout.c
src/libostree/ostree-repo.c
src/libotutil/ot-gio-utils.c
src/libotutil/ot-unix-utils.c
src/libotutil/ot-unix-utils.h
src/main.c

index c487ff1ac1af2253a58c79067df953233129e02b..be78b1fa331c10a4f19bead30cd327aac268465c 100644 (file)
@@ -31,7 +31,7 @@ LT_INIT
 
 PKG_PROG_PKG_CONFIG
 
-PKG_CHECK_MODULES(GIO_UNIX, [gio-unix-2.0 >= 2.30])
+PKG_CHECK_MODULES(GIO_UNIX, [gio-unix-2.0 >= 2.28])
 
 AM_PATH_PYTHON
 
index 7fb7bd34bc5301403cc88c39dac0e1410a41eb98..e4f09fb309d5b53efd1b16743152a8f7f0cb5e48 100644 (file)
@@ -268,7 +268,7 @@ check_trigger (OstreeCheckout *self,
     goto out;
   datain = g_data_input_stream_new (instream);
 
-  while ((line = g_data_input_stream_read_line_utf8 (datain, &len, NULL, &temp_error)) != NULL)
+  while ((line = g_data_input_stream_read_line (datain, &len, NULL, &temp_error)) != NULL)
     {
       if (g_str_has_prefix (line, "# IfExecutable: "))
         {
index 689285c3e94d939b4831bc1ecabfd35342b14146..2fbe308f0c685551f41775e0897e0d7e3ace5100 100644 (file)
@@ -19,6 +19,8 @@
  * Author: Colin Walters <walters@verbum.org>
  */
 
+#define _GNU_SOURCE
+
 #include "config.h"
 
 #include "ostree.h"
@@ -265,7 +267,7 @@ import_gvariant_object (OstreeRepo  *self,
   serialized = g_variant_new ("(uv)", (guint32)type, variant);
 
   tmp_name = g_build_filename (priv->objects_path, "variant-tmp-XXXXXX", NULL);
-  fd = mkstemp (tmp_name);
+  fd = g_mkstemp (tmp_name);
   if (fd < 0)
     {
       ot_util_set_error_from_errno (error, errno);
index 0d490754fe86b48c63d4ab5def1a6c9d63a1dd65..7663d4d2471f41829cf2e7cf340680b0644fb550 100644 (file)
@@ -21,7 +21,6 @@
 
 #include "config.h"
 
-#include <glib-unix.h>
 #include <gio/gio.h>
 #include <gio/gunixinputstream.h>
 
index 95cdb8d6c3f8e3bc9c3306ec7975b343def2887b..e1e897257f76b99b33d41ccc672304e2734f8eb9 100644 (file)
@@ -23,7 +23,6 @@
 
 #include "ot-unix-utils.h"
 
-#include <glib-unix.h>
 #include <gio/gio.h>
 #include <gio/gunixoutputstream.h>
 
@@ -205,7 +204,7 @@ ot_util_set_error_from_errno (GError **error,
                               gint     saved_errno)
 {
   g_set_error_literal (error,
-                       G_UNIX_ERROR,
+                       G_IO_ERROR,
                        0,
                        g_strerror (saved_errno));
   errno = saved_errno;
index dbbf8c07ba9fd0da4ee944227fe21172df18af27..0e1d3926b90ef04c66ce0cc5aeaffecd016b55e2 100644 (file)
 #define __OSTREE_UNIX_UTILS_H__
 
 #include <gio/gio.h>
-#include <glib-unix.h>
 
 /* I just put all this shit here. Sue me. */
 #include <sys/types.h>
+#include <errno.h>
 #include <sys/stat.h>
 #include <unistd.h>
 #include <dirent.h>
index e0a813d252668c918a5b1a34a58ac727582a7716..5936fc3f73bd3f6eaaf3a3e83594952059906bbd 100644 (file)
@@ -21,7 +21,6 @@
 
 #include "config.h"
 
-#include <glib-unix.h>
 #include <gio/gio.h>
 
 #include <string.h>